package com.lc.big_event.anno;

import com.lc.big_event.validation.StateValidation;
import jakarta.validation.Constraint;
import jakarta.validation.Payload;

import java.lang.annotation.*;

/**
 * @author liuchun
 */
@Documented
@Target(ElementType.FIELD)
@Retention(RetentionPolicy.RUNTIME)
@Constraint(validatedBy = {StateValidation.class})
public @interface State {
    String message() default "{文章状态必须是已发布|草稿}";

    Class<?>[] groups() default {};

    Class<? extends Payload>[] payload() default {};

}
